/*
 * @Description: 
 * @Version: 0.0.0
 * @Autor: 源
 * @Date: 2022-10-21 11:53:06
 * @LastEditors: 源
 * @LastEditTime: 2022-11-01 15:25:50
 * @FilePath: \pnpm-v3-ts-ui\docs\api\gitee.ts
 */
import axios from 'axios'
const giteeUrl='https://gitee.com/api/v5/repos/tommy1254/pnpm-v3-ts-ui/'
export function getGiteeBranchs () {
  return axios.get(`${giteeUrl}branches`).then((res) => {
    
    if(res.status!=200){
      console.log('未知错误');
      return ''
    }    
    return res.data
  }).catch((err) => {
    
  });
}
export function getGiteeCommits(branch:string) {
  axios.get(`${giteeUrl}commits/${branch}?&page=1&per_page=20`).then((res) => {
    console.log(res);
    
  })
}
